package com.wswy.wyjk.api;

import android.util.Log;
import android.util.Pair;

import com.wswy.wyjk.BuildConfig;
import com.wswy.wyjk.ui.uitls.ScUtil;

public class Constant {

    public static final String OLDURL = BuildConfig.URL;

    public static final String URL = "http://jk.zqwzc.com";

    public static final String userAgreementUrl = "http://wap.zqwzc.cn/single-page/app-user-protocol?";
    public static final String privacyPolicyUrl = "http://wap.zqwzc.cn/single-page/privacy-policy?";
    public static final String platform = "platform=12123jktk";
    public static final String HWPlatform = "platform=jtjktk";
    public static final String feedbackUrl = "https://support.qq.com/product/300753";

    public static final String TX007ID = "2025828744";//腾讯007 appid

    public static final String TC = "TencentWaterproofWall";
    public static final String GEETEST = "geeTest";
    public static final String PASS = "pass";
    public static final String CAPTCHA = "Captcha";


    /**
     * bugly
     */
    public static final String buglyAppId = "082a4ffcbc";

    /**
     * 加密相关
     */
    public static final String PLATFORM = "ANDROID";

    public static final String APPID = "Qxc6O_PxQ0NdqgNr";


    public static final String APPKEY = "1108738233";//开屏广告位appkey
    public static final String POSTID = "2011741778456723";//开屏广告位id


    public static final String SP_UUID_KEY = "_d_id";
    public static final String CLIENT_KEY;
    //驾驶证等识别
    static final String OCR_API;
    private static final Pair<String, String>[] TC_OCRS = new Pair[2];

    static {
        // ddd04e1322e55752cdff46ad0d2787c7
//        CLIENT_KEY = new String(ScUtil.xor(
//                new byte[]{-78, -22, -71, -31, -91, 108, 93, -26, -65, -69, -76, -14, 103, 95, -24, -17, -17, -31, -12, 53, 11, -23, -72, -68, -26, -9, 54, 10, -77, -20, -24, -32},
//                new byte[]{-47, -38, -114, -42, -57, 84, 57}));

        CLIENT_KEY="vOTJoHwgOk-V12wTNCOxeAR_bj2da9eK";

        //https://api.ai.qq.com/fcgi-bin/ocr/ocr_driverlicenseocr
        OCR_API = new String(ScUtil.xor(
                new byte[]{103, -88, 96, 118, 76, 114, -80, 33, 100, 22, -109, 104, -99, 16, -23, 105, 85, -63, -99, -56, 35, -82, -53, -53, -68, 43, -102, -69, 76, 108, 33, 27, -82, 43, 53, 103, -88, 96, 118, 76, 114, -80, 33, 100, 22, -109, 104, -99, 16, -23, 105, 85, -63, -99, -56},
                new byte[]{15, -36, 20, 6, 63, 72, -97, 14, 5, 102, -6, 70, -4, 121, -57, 24, 36, -17, -2, -89, 78, -127, -83, -88, -37, 66, -73, -39, 37, 2, 14, 116, -51, 89, 26, 8, -53, 18, 41, 40, 0, -39, 87, 1, 100, -1, 1, -2, 117, -121, 26, 48, -82, -2, -70}
        ));

        TC_OCRS[0] = Pair.create("", "");

//        //2110060737
//        OCR_AI_APPID = new String(ScUtil.xor(new byte[]{34, 104, -93, -61, 36, 80, -56, -120, -26, -99},
//            new byte[]{16, 89, -110, -13, 20, 102, -8, -65, -43, -86, -19}));
//
//        //vOKzfZNm6jQuCwjD
//        OCR_AI_APPKEY = new String(ScUtil.xor(new byte[]{113, 101, 8, -85, 108, -96, 54, 121, 41, 109, 123, 54, -110, 125, -112, 60},
//            new byte[]{7, 42, 67, -47, 10, -6, 120, 20, 31}));

        String appid = new String(ScUtil.xor(new byte[]{34, 104, -93, -61, 36, 80, -56, -120, -26, -99},
                new byte[]{16, 89, -110, -13, 20, 102, -8, -65, -43, -86, -19}));
        String appKey = new String(ScUtil.xor(new byte[]{113, 101, 8, -85, 108, -96, 54, 121, 41, 109, 123, 54, -110, 125, -112, 60},
                new byte[]{7, 42, 67, -47, 10, -6, 120, 20, 31}));

        TC_OCRS[0] = Pair.create(appid, appKey);

        appid = new String(ScUtil.xor(new byte[]{80, -76, 53, -31, 68, 63, 75, 12, 62, 22},
                new byte[]{98, -123, 4, -44, 124, 11, 121, 58, 13, 46, 19, -21}));
        //vOKzfZNm6jQuCwjD
        appKey = new String(ScUtil.xor(new byte[]{-15, -101, -10, -26, -108, -99, 113, 43, 77, 87, 29, 22, -58, -81, -26, -67},
                new byte[]{-120, -34, -124, -124, -94, -52, 50, 109, 123, 25, 122, 102}));

        TC_OCRS[1] = Pair.create(appid, appKey);

//      String  appid = "Qxc6O_PxQ0NdqgNr";
//      String  appKey = "vOTJoHwgOk-V12wTNCOxeAR_bj2da9eK";
//
//        TC_OCRS[0] = Pair.create(appid, appKey);


        if (BuildConfig.DEBUG) {
            Log.e("Configs", "CLIENT_KEY:" + CLIENT_KEY);
            Log.e("Configs", "OCR_API:" + OCR_API);

            for (Pair<String, String> tcOcr : TC_OCRS) {
                Log.e("Configs", "OCR_AI_APPID:" + tcOcr.first);
                Log.e("Configs", "OCR_AI_APPKEY:" + tcOcr.second);
                Log.e("Configs", "OCR_AI_APP------");
            }
        }

    }
}
